package com.ruoyi.game.core;

import com.ruoyi.game.core.card.CardPower;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 一回合座位
 * - 本轮允许操作类型
 * - 是否已操作及内容
 * - 回合内超时控制
 */
@Data
@Slf4j
@RequiredArgsConstructor
public class GameRoundPos {
    private final int seatIndex;
    private GameSetPos setPos;
    private boolean operated = false;
    private final Set<PKOpType> receiveOpTypes = new HashSet<>();
    private List<Integer> cards = new ArrayList<>();  // 本轮出牌
    private CardPower cardPower = null;                 // 本轮出牌评估值（越大越强）
    private long opStartTime = -1;                  // 当前操作位的操作开始计时时间
    public GameRoundPos(int seatIndex, GameSetPos setPos) {
        this.seatIndex = seatIndex;
        this.setPos = setPos;
    }

    public void markOperated() {
        this.operated = true;
    }
}
